A sample application illustrating drag and drop techniques for use with file system objects. This file illustrates how applications can use drag and drop commands in a way compatible with current and past versions of the Finder.
Drag and drop techniques illustrated include:
• translucent drag and drop for icons,
• drag and drop of hfs objects,
• creating and providing promised files in drags,
• installing fake apple event handlers for drag and drop compatibility with past versions of the Finder.
Other interesting techniques illustrated include:
• retrieving icons for files,
• graying out a section of a window,
• converting icons to pixmaps for translucent dragging,
• resolving alias files while avoiding user interaction alerts that may pop up,
You may incorporate this sample code into your applications without restriction, though the sample code has been provided "AS IS" and the responsibility for its operation is 100% yours. However, what you are not permitted to do is to redistribute the source as "DSC Sample Code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple Sample Code, but that you've made changes.
Files:
':FinderDragPro.prj Data:' - codewarrior pro project data.
:obj: - object files created during the build process.
FDPUtilities.c - some utilities used in the FinderDragPro applicaion. To simplify the example file, these routines were moved here.
FDPUtilities.h - declarations for routines in FDPUtilities.c.
FinderDragPro - FAT application file.
FinderDragPro.c - main program file.
FinderDragPro.h - constants and declarations used in main program file.
FinderDragPro.prj - codewarrior pro project file.
FinderDragPro.r - rez file for resources in FinderDragPro.
FinderDragPro.rsrc - ResEdit resource file for resources in FinderDragPro.
GetIconSuiteFromFinder.c - routines for retrieving icons for files from the Finder. These are only used if IconServices is not present.
GetIconSuiteFromFinder.h - declarations for routines defined in GetIconSuiteFromFinder.c.